package org.jhotdraw.app.action.edit;

import java.awt.event.ActionEvent;
import java.awt.geom.Point2D;

import javax.swing.JComponent;

import org.jhotdraw.util.ResourceBundleUtil;

import stateDiagram.figures.StateFigure;
import edu.umd.cs.findbugs.annotations.Nullable;

public class RemoveInternalTransitionAction extends AbstractSelectionAction {
	 public final static String ID = "edit.RemoveInternalTransition";
     private StateFigure callingFigure = null;
     private int index;

	public RemoveInternalTransitionAction(@Nullable JComponent target, StateFigure fig, int index){
	super(target);	
	 ResourceBundleUtil labels = ResourceBundleUtil.getBundle("stateDiagram.Labels");
	 labels.configureAction(this, ID);
	 callingFigure = fig;
	 this.index = index;
	}
	
	
	 public void actionPerformed(ActionEvent evt){
		 callingFigure.removeInternalTransition(index);
	 }
}
